clear;clc;
%% setup devices
tek=EquipmentControl.AWG.TektronixAFG3252('visa-usb',  'TCPIP0::192.168.1.102::inst0::INSTR');
bxSource =  EquipmentControl.CurrentSource.ThorlabsLDC201('Bx');
bzSource =  EquipmentControl.CurrentSource.ThorlabsLDC201('Bz');
bxSource.controlledBy(tek, 1);
bzSource.controlledBy(tek, 2);

%% 2D scan of finite-duration: 10 bx ramp pulses & 1 bz ramp pulse, simultaneously.
bxSource.scan(0.0, 1.0, 20.0, 'burst_cycle', 10);
bzSource.scan(0.0, 1.0, 2.0, 'burst_cycle', 1);

bxSource.fire(); bzSource.fire();
tek.forceTrigger;

pause(1);

bxSource.silence; bzSource.silence;
%% 1D scan (infinite long sequence)
bxSource.scan(0, 1, 20, 'burst_cycle', 'INF');
bxSource.fire();

tek.forceTrigger;
